package com.donfu.system.service.house.impl;

import java.util.List;

import com.donfu.system.domain.house.HouseAddress;
import com.donfu.system.mapper.house.HouseAddressMapper;
import com.donfu.system.service.house.IHouseAddressService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 收货地址Service业务层处理
 * 
 * @author donfu
 * @date 2021-12-01
 */
@Service
public class HouseAddressServiceImpl implements IHouseAddressService
{
    @Autowired
    private HouseAddressMapper houseAddressMapper;

    /**
     * 查询收货地址
     * 
     * @param id 收货地址主键
     * @return 收货地址
     */
    @Override
    public HouseAddress selectHouseAddressById(Long id)
    {
        return houseAddressMapper.selectHouseAddressById(id);
    }

    /**
     * 查询收货地址列表
     * 
     * @param houseAddress 收货地址
     * @return 收货地址
     */
    @Override
    public List<HouseAddress> selectHouseAddressList(HouseAddress houseAddress)
    {
        return houseAddressMapper.selectHouseAddressList(houseAddress);
    }

    /**
     * 根据用户查询收货地址
     *
     * @param houseAddress 收货地址
     * @return 收货地址
     */
    @Override
    public List<HouseAddress> selectHouseAddressListByUser(HouseAddress houseAddress) {
        return houseAddressMapper.selectHouseAddressListByUser(houseAddress);
    }

    /**
     * 新增收货地址
     * 
     * @param houseAddress 收货地址
     * @return 结果
     */
    @Override
    public int insertHouseAddress(HouseAddress houseAddress)
    {
        return houseAddressMapper.insertHouseAddress(houseAddress);
    }

    /**
     * 修改收货地址
     * 
     * @param houseAddress 收货地址
     * @return 结果
     */
    @Override
    public int updateHouseAddress(HouseAddress houseAddress)
    {
        return houseAddressMapper.updateHouseAddress(houseAddress);
    }

    /**
     * 批量删除收货地址
     * 
     * @param ids 需要删除的收货地址主键
     * @return 结果
     */
    @Override
    public int deleteHouseAddressByIds(Long[] ids)
    {
        return houseAddressMapper.deleteHouseAddressByIds(ids);
    }

    /**
     * 删除收货地址信息
     * 
     * @param id 收货地址主键
     * @return 结果
     */
    @Override
    public int deleteHouseAddressById(Long id)
    {
        return houseAddressMapper.deleteHouseAddressById(id);
    }
}
